use Operation;

package KillEntity;
@ISA = qw/Operation/;

sub init{
    $self = shift;

    $self->dependencies(qw/LogManager EntityManager/);
}

sub perform{
    $self = shift;
    $lm = $self->{LogManager};

    my ($entity, $map) = ($self->params->{ENTITY},
			  $self->params->{MAP});



    $lm->log("Killing ".$entity." in ".$map);

    $self->{EntityManager}->unregisterEntity($entity);
    $entity->unplace($map);
    
    my $result = ActionResult->new("SUCCESS", "OK");
    return $result;
}

1;

